---
sidebar_class_name: hidden
---

import CodeBlock from "@theme/CodeBlock";
import DebuggingExample from "@examples/agents/mrkl.ts";

# Logging and tracing

You can pass the `verbose` flag when creating an agent to enable logging of all events to the console. For example:

You can also enable [tracing](/docs/production/tracing) by setting the LANGCHAIN_TRACING environment variable to `true`.

import IntegrationInstallTooltip from "@mdx_components/integration_install_tooltip.mdx";

<IntegrationInstallTooltip></IntegrationInstallTooltip>

```bash npm2yarn
npm install @langchain/openai
```

<CodeBlock language="typescript">{DebuggingExample}</CodeBlock>
